put('publishDate',function(){
	var headStr = '<div class="w-loc-head"><a id="wDateFinal" class="w-loc-arrow iconfont" href="javascript:void(0);">&#xf0292;</a><span class="w-loc-txt">选择发布时间</span></div>' ;
	var dateStr = '<div id="widgetDateList" class="w-loc-list"></div>' ;
	var htmlStr = '<div id="widgetDate" class="w-loc">'  + 
					headStr + dateStr + '</div>' ;
	$('body').append(htmlStr) ; 
	$.ajax({
		url : window.appRoot + '/publishDate.html' ,
		method : 'get' ,
		dataType : 'json' ,
		success : function( list ){
			var createItem = function(json){
				return '<a href="javascript:void(0);" class="m-data-item w-loc-item"><span data-id="'+json.id+'" class="w-loc-txtWrap">'+json.name+'</span><span class="w-locl-arrow iconfont">&#xf016d;</span></a>';
			} ;
			for(var i = 0 ; i < list.length ; i++ ){
				$('#widgetDateList').append(createItem(list[i])) ;
			} 
			
		}
	}) ;
	var url = 'publishDate.html' ;
	var finalCall = function(){} ;
	var bodyCss = {
		_ele : $('body') ,
		set : function(){
			this._ele.css('overflow','hidden');
			var self = this ;
			$('.w-loc').css({
				'height' : $(window).height() 
			});
		} ,
		reset : function(){
			this._ele.css('overflow','auto');
		}
	} ;
	
	$('#widgetDateList').on('click','.m-data-item',function(){
		var point = $(this).find('.w-loc-txtWrap') ;
		finalCall({ id : point.attr('data-id') , name : point.html() }) ;
		$('#widgetDate').css('left','21rem') ;
		bodyCss.reset() ;	
	});
	
	return {
		open : function(callback){
			var wrap = $('#widgetDate') ;
			try{
				wrap[0].clientLeft ;
			}catch(ev){}
			if( typeof callback === 'function' ){
				finalCall = callback ;
			}
			wrap.css({'left':'0'}) ;
			bodyCss.set() ;
		},
		close : function(){
			var wrap = $('#widgetDate') ;
			wrap.css('left','21rem') ;
			bodyCss.reset() ;
		}
	}	
}) ;